<template>
  <div>
    <div class="mp-headfigure" @click="gallerys">
      <div class="mp-headfigure-wrap">
        <img class="mp-headfigure-img" :src="banner">
      </div>
      <div class="mp-headfeagure-info">
        <div class="mp-headfeagure-title">
          {{ name }}
        </div>
      </div>
      <div class="mp-imgswipeicon">
        <span></span><em>{{ gallery.length }}</em>
      </div>
    </div>
    <gallery :list="gallery"></gallery>
  </div>
</template>

<script>
import Gallery from '@/components/gallery/Gallery.vue'
export default {
  name: 'DetailBanner',
  props: {
    name: String,
    banner: String,
    gallery: Array
  },
  components: {/* 注册组件 */
    Gallery
  },
  methods: {
    gallerys () {
      // console.log('55')
      let blick = true
      this.$store.dispatch('isture', blick)
    }
  }
}
</script>

<style lang="stylus" scoped="scoped">
  .mp-headfigure
   position relative
   .mp-headfigure-wrap
    overflow hidden
    height 0rem
    width 100%
    padding-bottom 55%
    .mp-headfigure-img
     width 100%
     vertical-align top
  .mp-headfeagure-info
   position absolute
   bottom .36rem
   left .2rem
   min-height .4rem
   .mp-headfeagure-title
    position relative
    line-height .4rem
    color #fff
    /* z-index 1 */
    font-size .36rem
    text-shadow 0 1px 2px rgba(0,0,0,0.70)
  .mp-imgswipeicon
   position: absolute;
   right: .2rem;
   bottom: .36rem
   width 1.2rem
   height .4rem
   background rgba(0,0,0,.5)
   border-radius .2rem
   font-size .24rem
   color #fff
   line-height .4rem
   text-align center
</style>
